package com.demo.component;

import com.demo.module.Student;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2023-05-24
 * Time:2:06
 */
@Component
public class StudentBean {
    @Bean
    public  Student student1() {
        //伪代码，构建对象
        Student student = new Student();
        student.setAge(11);
        student.setName("张三");
        student.setId(11);
        return student;
    }

    @Bean
    public  Student student2() {
        //伪代码，构建对象
        Student student = new Student();
        student.setAge(11);
        student.setName("张三");
        student.setId(11);
        return student;
    }
}
